* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    outline: 0;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #fae861;
    --secondary-color: #ff9500;
    --tertiary-color: #003f3c;
    --bg-light: #ffffff;
    --text-light: #111111;
    --text-dark: #f5f5f5;
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --icon-size: 24px;
    --header-height: 70px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --action-icon: rgba(255, 248, 170, 0.9);
    --action-bg: rgba(46, 46, 46, 0.9);
    --action-bg-hover: #625e66;
    --light-download-btn: rgb(0, 21, 51);
}

body {
    transition: var(--transition);
    overflow-x: hidden;
}

.dark-mode {
    --primary-color: #001b2b;
    --secondary-color: #faf861;
    --tertiary-color: #c0c0c0;
    --bg-light: #000000;
    --text-light: #f5f5f5;
    --action-icon: rgba(0, 32, 34, 0.9);
    --action-bg: rgba(255, 255, 255, 0.9);
    --action-bg-hover: #625e66;
    --action-icon-hover: #ffffff;
    --bg-dark: #121212;
    --light-download-btn: #fff;
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Lazy Loading Styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
    background-color: rgba(0, 0, 0, 0.05);
}

.lazy.loaded {
    opacity: 1;
}

/* Lazy Loading Placeholder Animation */
@keyframes loadingPulse {
    0% { background-color: rgba(0, 0, 0, 0.05); }
    50% { background-color: rgba(0, 0, 0, 0.1); }
    100% { background-color: rgba(0, 0, 0, 0.05); }
}

img.lazy:not([src*="data:image"]) {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

/* Header */
.header {
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    height: var(--header-height);
}

.dark-mode .header {
    background-color: #000000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    height: 100%;
    padding: var(--spacing-sm) 0;
    transition: transform 0.3s ease;
}

.logo i {
    font-size: var(--icon-size);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size);
    height: var(--icon-size);
    line-height: 1;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.theme-toggle i {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    color: var(--tertiary-color);
}

/* Filter Bar */
.filter-container {
    padding: var(--spacing-md) 2rem;
    background-color: var(--bg-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    transition: var(--transition);
}

.search-box {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    padding: 10px var(--spacing-md);
    transition: all 0.3s ease;
    flex: 1;
    max-width: 400px;
    min-width: 200px;
    border: 1px solid transparent;
    height: 42px;
}

.search-box:hover,
.search-box:focus-within {
    background-color: rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(250, 248, 97, 0.1);
}

.dark-mode .search-box {
    background-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .search-box:hover,
.dark-mode .search-box:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.search-box i {
    margin-right: var(--spacing-sm);
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 16px;
    width: 16px;
    height: 16px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.filter-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--text-light);
    padding: 8px var(--spacing-md);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.dark-mode .filter-btn {
    border-color: var(--primary-color);
    color: var(--text-dark);
}

.dark-mode .filter-btn:hover, .dark-mode .filter-btn.active {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

/* Main Content */
.home-page {
    background-color: var(--bg-light);
    flex: 1;
    transition: var(--transition);
}

.masonry-layout {
    columns: 250px;
    column-gap: 1.5rem;
    padding: 2rem;
}

/* Image Cards */
.image-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    will-change: transform, box-shadow;
}

.image-card:hover {
    transform: translate3d(0, -5px, 0);
    -webkit-transform: translate3d(0, -5px, 0);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-card img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    display: flex;
    align-items: flex-end;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: opacity;
    justify-content: center;
    padding: 1rem;
}

.image-card:hover .image-overlay {
    opacity: 1;
}

.image-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.action-btn {
    background-color: var(--action-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    transform: translateY(20px);
    opacity: 0;
}

.image-card:hover .action-btn {
    transform: translateY(0);
    opacity: 1;
}

.image-card:hover .action-btn:nth-child(1) {
    transition-delay: 0.1s;
}

.image-card:hover .action-btn:nth-child(2) {
    transition-delay: 0.2s;
}

.image-card:hover .action-btn:nth-child(3) {
    transition-delay: 0.3s;
}

.action-btn:hover {
    background-color: var(--action-bg-hover);
    transform: translateY(-5px);
}

.action-btn i {
    color: var(--action-icon);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Enhanced lightbox button styling with magnetic effect */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
    opacity: 0.7;
    z-index: 2001;
    backdrop-filter: blur(2px);
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.lightbox-btn:hover {
    color: var(--text-light);
    background-color: var(--secondary-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
}

.lightbox-btn i {
    color: rgb(255, 255, 255);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.lightbox-btn:hover i {
    color: var(--text-light);
    transform: scale(1.2);
}

/* Close button with magnetic effect */
.close-lightbox {
    color: rgb(255, 0, 0);
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.2rem;
    /* cursor: pointer; */
    transition: all 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    z-index: 2001;
    opacity: 0.7;
    backdrop-filter: blur(2px);
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-lightbox:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.close-lightbox i {
    color: rgb(255, 0, 0);
    transition: transform 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.close-lightbox:hover i {
    transform: rotate(90deg);
}

/* Download button with magnetic effect */
.lightbox-download-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    z-index: 2001;
    opacity: 0.7;
    backdrop-filter: blur(2px);
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.lightbox-download-btn:hover {
    background-color: var(--light-download-btn);
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-download-btn i {
    color: rgb(255, 232, 59);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.lightbox-download-btn:hover i {
    color: var(--light-download-btn);
    transform: translateY(-2px);
}

/* Mobile responsiveness fixes */
@media (max-width: 1024px) {
    /* Show overlay and buttons on tap for mobile/tablet */
    .image-card.active .image-overlay {
        opacity: 1;
    }

    .image-card.active .action-btn {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }

    /* Adjust button sizes for better touch targets */
    .action-btn {
        width: 44px;
        height: 44px;
    }

    .action-btn i {
        font-size: 18px;
    }

    /* Add tap highlight for better feedback */
    .image-card {
        -webkit-tap-highlight-color: transparent;
    }

    /* Ensure overlay is visible immediately on touch */
    .image-overlay {
        transition: opacity 0.2s ease;
    }
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    padding: var(--spacing-lg) 2rem;
    text-align: center;
    transition: var(--transition);
}

.dark-mode .footer {
    background-color: #101010;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.social-link {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-link i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.dark-mode .social-link {
    color: var(--text-dark);
}

.social-link:hover {
    color: var(--tertiary-color);
    /* transform: translateY(-3px); */
}

/* Space-themed Notification System */
.notification-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    perspective: 1000px;
}

.notification {
    background: rgba(13, 16, 33, 0.85);
    color: #e0e6ff;
    padding: 18px 25px;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(62, 100, 255, 0.15), 
                inset 0 0 15px rgba(30, 64, 255, 0.1);
    transform: translateX(100%);
    animation: space-notification-in 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 350px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(111, 155, 255, 0.2);
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(111, 155, 255, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 70% 60%, rgba(90, 120, 255, 0.1) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* Star-like dots in the notification */
.notification::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle at 15% 20%, white 0%, transparent 1px),
        radial-gradient(circle at 85% 30%, white 0%, transparent 1px),
        radial-gradient(circle at 40% 70%, white 0%, transparent 1px),
        radial-gradient(circle at 70% 90%, white 0%, transparent 1px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.notification-icon {
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--notification-color, #4a6fff);
    box-shadow: 0 0 15px var(--notification-color, #4a6fff),
                inset 0 0 8px rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 2;
}

.notification-icon i {
    color: white;
    font-size: 1rem;
}

.notification-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: white;
}

.notification-message {
    font-size: 0.9rem;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

.notification.info {
    --notification-color: #4a6fff;
}

.notification.success {
    --notification-color: #3ec74f;
}

.notification.error {
    --notification-color: #ff5a6a;
}

.notification.warning {
    --notification-color: #ffb347;
}

.notification.fade-out {
    animation: space-notification-out 0.5s forwards cubic-bezier(0.7, 0, 0.84, 0);
}

@keyframes space-notification-in {
    0% { 
        transform: translateX(100%);
        opacity: 0;
        filter: brightness(1.5) blur(5px);
    }
    100% { 
        transform: translateX(0);
        opacity: 1;
        filter: brightness(1) blur(0);
    }
}

@keyframes space-notification-out {
    0% { 
        transform: translateX(0);
        opacity: 1;
        filter: brightness(1) blur(0);
    }
    100% { 
        transform: translateX(100%);
        opacity: 0;
        filter: brightness(1.5) blur(5px);
    }
}

/* Glowing pulse for notifications */
.notification.glow {
    animation: cosmic-pulse 3s infinite alternate;
}

@keyframes cosmic-pulse {
    0% {
        box-shadow: 0 0 25px rgba(62, 100, 255, 0.15), 
                    inset 0 0 15px rgba(30, 64, 255, 0.1);
    }
    100% {
        box-shadow: 0 0 30px var(--notification-color, rgba(62, 100, 255, 0.3)), 
                    inset 0 0 20px rgba(var(--notification-color, rgba(30, 64, 255, 0.2)));
    }
}

/* Dark mode styles for notifications */
.dark-mode .notification {
    background: rgba(10, 12, 24, 0.9);
    color: #e0e6ff;
    border: 1px solid rgba(100, 140, 255, 0.15);
}

/* Media Queries */
@media (max-width: 768px) {
    .masonry-layout {
        columns: 200px;
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .filter-container {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .prev-btn {
        left: 10px !important;
    }
    
    .next-btn {
        right: 10px !important;
    }
    
    .lightbox-btn {
        opacity: 1;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    height: 100%;
}

/* Tools icon styles */
.tools-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition), transform 0.3s ease;
    z-index: 1001;
}

.tools-icon i {
    font-size: var(--icon-size);
    color: var(--text-light);
    transition: var(--transition), transform 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size);
    height: var(--icon-size);
}

.tools-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(30deg);
}

.tools-icon:hover i {
    color: var(--tertiary-color);
}

.tools-icon.pulse-animation {
    animation: iconPulse 1s infinite;
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Tools Menu */
.tools-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(18, 18, 18, 0.98);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.tools-menu.active {
    opacity: 1;
    pointer-events: all;
}

.tools-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 80px;
}

.tools-menu-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.tools-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition);
}

.tools-menu-close i {
    font-size: 1.2rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.tools-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.tools-menu-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tools-menu.active .tools-grid {
    opacity: 1;
    transform: translateY(0);
}

.tool-item {
    position: relative;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 180px;
    opacity: 0;
    transform: translateY(20px);
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.tool-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-item:hover::before {
    opacity: 1;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.tool-icon i {
    font-size: 1.5rem;
    color: white;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.tool-item:hover .tool-icon {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
}

.tool-info {
    flex: 1;
    z-index: 1;
}

.tool-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
    position: relative;
    display: inline-block;
}

.tool-info h3::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.tool-item:hover .tool-info h3::after {
    width: 100%;
}

.tool-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.tool-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.tools-menu.active .tool-item {
    opacity: 1;
    transform: translateY(0);
}

.tools-menu.active .tool-item:nth-child(1) { transition-delay: 0.1s; }
.tools-menu.active .tool-item:nth-child(2) { transition-delay: 0.15s; }
.tools-menu.active .tool-item:nth-child(3) { transition-delay: 0.2s; }
.tools-menu.active .tool-item:nth-child(4) { transition-delay: 0.25s; }
.tools-menu.active .tool-item:nth-child(5) { transition-delay: 0.3s; }
.tools-menu.active .tool-item:nth-child(6) { transition-delay: 0.35s; }

.tool-item[data-bg-color="#8E7F7F"]:hover {
    background-color: rgba(142, 127, 127, 0.2);
}

.tool-item[data-bg-color="#4A4A4A"]:hover {
    background-color: rgba(74, 74, 74, 0.2);
}

.tool-item[data-bg-color="#D4AF37"]:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

.tool-item[data-bg-color="#121212"]:hover {
    background-color: rgba(18, 18, 18, 0.4);
}

.tool-item[data-bg-color="#78a4aa"]:hover {
    background-color: rgba(120, 164, 170, 0.2);
}

.tool-item[data-bg-color="#e9d0a4"]:hover {
    background-color: rgba(233, 208, 164, 0.2);
}

/* Media Queries for Tools Menu */
@media (max-width: 768px) {
    .tools-icon {
        width: 36px;
        height: 36px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tool-item {
        min-height: 160px;
        padding: 1.2rem;
    }
    
    .tools-menu-header {
        padding: 1rem;
    }
    
    .tools-menu-content {
        padding: 1rem;
    }
    
    .tools-menu-logo {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .tools-icon {
        width: 32px;
        height: 32px;
    }
    
    .tools-icon i {
        font-size: 1rem;
    }
}

/* Magnetic Effect Styles */
.magnetic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.magnetic.active {
    transform: scale(1.1);
}

.magnetic.hover {
    z-index: 10;
}

.magnetic > * {
    transition: transform 0.3s cubic-bezier(0.21, 0.61, 0.35, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Specific magnetic effects for different elements */
.action-btn.magnetic:hover {
    transform: scale(1.15);
}

.filter-btn.magnetic:hover {
    transform: translateY(-2px);
}

.social-link.magnetic:hover {
    transform: translateY(-3px) scale(1.1);
}

.logo.magnetic:hover {
    transform: scale(1.03) translateY(-1px);
}

@media (hover: none) and (pointer: coarse) {
    /* Disable magnetic effect on touch devices */
    .magnetic {
        transform: none !important;
    }
    
    .magnetic > * {
        transform: none !important;
    }
}

/* Fix magnetic effects for specific elements */
.magnetic > i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.action-btn.magnetic {
    transform-style: preserve-3d;
}

.logo.magnetic {
    transform-style: preserve-3d;
}

/* Star twinkling animation */
@keyframes twinkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}

/* Protection styles */
.protected-image-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.protected-image-wrapper img {
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.image-protection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
}

/* Watermark styles */
.watermarked-image-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    z-index: 5;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.8) 10px,
        rgba(200, 200, 200, 0.8) 10px,
        rgba(200, 200, 200, 0.8) 20px
    );
}

.watermarked-image-container:hover .watermark-overlay {
    opacity: 0.6;
}

/* Protection message animation */
.protection-message {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Disable text selection on protection elements */
.protection-message,
.watermark-overlay,
.image-protection-layer {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Enhanced watermark visibility */
.watermark-overlay {
    background-blend-mode: overlay;
    background-size: cover;
    backdrop-filter: brightness(0.98);
}

/* Loading state for watermarked images */
.watermarked-image-container.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* Optimize performance */
.watermarked-image-container img,
.watermark-overlay {
    will-change: opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}
/* Protection styles */
.protected-image-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.protected-image-wrapper img {
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.image-protection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10;
}

.image-watermark {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.protected-image-wrapper:hover .image-watermark {
    opacity: 1;
}

/* Protection message animation */
.protection-message {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Disable text selection on protection elements */
.protection-message,
.image-watermark,
.image-protection-layer {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
